package org.mapwar.web.config;

import org.mapwar.server.persistence.config.DbConfig;
import org.mapwar.service.config.ServiceConfiguration;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

/**
 * Created by zhebinwang on 2017/9/27.
 */
@Order(2)
public class StartConfig extends AbstractAnnotationConfigDispatcherServletInitializer {


    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        super.onStartup(servletContext);
    }

    protected Class<?>[] getRootConfigClasses() {
        //return new Class<?>[0];
        return new Class<?>[]{WebSecurityConfiguration.class,DbConfig.class, ServiceConfiguration.class,WebConfiguration.class};
    }

    protected Class<?>[] getServletConfigClasses() {
        return new Class<?>[0];
    }

    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
